linedisplaycache: improve invalidation with y_range
authorChristian Hergert <chergert@redhat.com>
Fri, 7 Aug 2020 19:25:06 +0000 (12:25 -0700)
committerChristian Hergert <chergert@redhat.com>
Fri, 7 Aug 2020 19:44:26 +0000 (12:44 -0700)
commit35325ea11ad97186281a45bf056c4939cc651a28
tree726f1c44ad2e456415a0c849d6233632b41c9572
parentcd0b9a2359275f320301705a4aaa0a8d1c4483ec
linedisplaycache: improve invalidation with y_range

When we invalidate a y_range using the common pattern of y==0 and
old_height==new_height, we are generally invalidating the entire buffer.

This short-circuits that case to just invalidate the buffer in a faster
and more complete form. The problem here appears to be that we can't
always calculate the ranges properly to invalidate because validation
has not run far enough.
gtk/gtktextlayout.c
gtk/gtktextlinedisplaycache.c
gtk/gtktextlinedisplaycacheprivate.h